package com.zrrd.learn.chapter08面向对象.objectoriented01;

import java.util.Scanner;

/**
 * 测试
 *
 * @author wrn
 * @version 1.0
 * @date 2023/7/24 10:29
 */

public class Test01 {

    public static void main(String[] args) {
        Person p =new Person();
        p.setName("小红");
        p.setAge(15);
        p.setSex("女");

        Student01 s = new Student01();
        System.out.println("请输入5科成绩：");
        Scanner in = new Scanner(System.in);
        for (int i = 0; i < s.score.length; i++) {
            s.score[i] = in.nextInt();
        }
        System.out.print("年龄为"+p.getAge()+"岁，性别为"+p.getSex()+"的"+p.getName()+"的");
        s.avgscore();
    }


}
